package co.com.ticci.autolavado.general;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class Conexion 
{
	 
		private static Conexion c;
		private EntityManagerFactory emf;
	
		private Conexion()
		{
			emf = Persistence.createEntityManagerFactory("autolavado_up");
		}
	
		public static Conexion getConexion()
		{
			if (c == null) c = new Conexion();
			return c;
		}
	
		public EntityManager getEntityManager()
		{
			return emf.createEntityManager();
		}
	
	
}
